package com.xuantu.pattern.create.singleton;

/**
 * 内部类模式
 * 线程安全
 * @author fengzp
 *
 */
public class InnerClassSingleton extends BaseSingleton {
 
	private InnerClassSingleton() {}
	
	public static InnerClassSingleton getInstance() {		
		return InnerClassSingletonInstance.INSTANCE;
	}
	
	private static class InnerClassSingletonInstance {
		private static InnerClassSingleton INSTANCE = new InnerClassSingleton();
	}
	 
}
